import request from '@/utils/request'

// 查询借阅记录列表
export function listRecord(query) {
  return request({
    url: '/borrow/record/list',
    method: 'get',
    params: query
  })
}

// 查询借阅记录详细
export function getRecord(recordId) {
  return request({
    url: '/borrow/record/' + recordId,
    method: 'get'
  })
}

// 归还图书
export function returnBook(bookId) {
  return request({
    url: '/borrow/record/' + bookId,
    method: 'post'
  })
}
